﻿using Microsoft.AspNetCore.Identity.UI.Services;

namespace WebAppWithIdentity.Services
{
    public class EmailSender : IEmailSender
    {
        private readonly ILogger<EmailSender> _logger;

        public EmailSender(ILogger<EmailSender> logger)
        {
            _logger = logger;
        }

        public Task SendEmailAsync(string email, string subject, string htmlMessage)
        {
            // 模拟发送邮件，仅记录日志
            _logger.LogInformation($"邮件已发送给：{email}，主题：{subject}，内容：{htmlMessage}");
            return Task.CompletedTask;
        }
    }
}
